//
//  HTPushReducer.swift
//  MagaCore
//
//  Created by MrMessy on 2023/5/28.
//

import Foundation
import ReSwift

struct HTPushReducer {
  static var var_reducer: Reducer<HTPushState> {
    return { action, state in
      var state = state ?? HTPushState()
      guard let action = action as? HTEnumPushAction else {
        return state
      }
      switch action {
      case .htEnumPageToPlayScreen(var_push: let var_push):
        state.var_push = var_push
        return state
      case .htEnumChangeColorScheme(var_colorScheme: let var_colorScheme):
        state.var_colorScheme = var_colorScheme
        return state
      }
    }
  }
}
